home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / System Extras Headers / GX Headers / camera library.h next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.9 KB  |  97 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        camera library.h
  3.  
  4.     Copyright:    © 1984-1994 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef cameraLibraryIncludes
  13. #define cameraLibraryIncludes
  14.  
  15. #include "math types.h"
  16. /*    #include <Types.h>                                            */
  17. /*        #include <ConditionalMacros.h>                            */
  18. /*        #include <MixedMode.h>                                    */
  19. /*            #include <Traps.h>                                    */
  20.     #ifdef __cplusplus
  21. extern "C" {
  22.     #endif
  23.  
  24. #if defined(powerc) || defined (__powerc)
  25. #pragma options align=mac68k
  26. #endif
  27. struct point3D {
  28.     Fixed                        x;
  29.     Fixed                        y;
  30.     Fixed                        z;
  31. };
  32. #if defined(powerc) || defined(__powerc)
  33. #pragma options align=reset
  34. #endif
  35.  
  36. #if defined(powerc) || defined (__powerc)
  37. #pragma options align=mac68k
  38. #endif
  39. struct unit3D {
  40.     fract                        x;
  41.     fract                        y;
  42.     fract                        z;
  43. };
  44. #if defined(powerc) || defined(__powerc)
  45. #pragma options align=reset
  46. #endif
  47.  
  48. #if defined(powerc) || defined (__powerc)
  49. #pragma options align=mac68k
  50. #endif
  51. struct camera {
  52.     struct point3D                location;
  53.     struct point3D                axis;
  54.     struct point3D                zenith;
  55.     struct point3D                observer;
  56.     gxMapping                    orientation;
  57. };
  58. #if defined(powerc) || defined(__powerc)
  59. #pragma options align=reset
  60. #endif
  61.  
  62. #if defined(powerc) || defined (__powerc)
  63. #pragma options align=mac68k
  64. #endif
  65. struct patch {
  66.     struct point3D                u;
  67.     struct point3D                v;
  68.     struct point3D                origin;
  69. };
  70. #if defined(powerc) || defined(__powerc)
  71. #pragma options align=reset
  72. #endif
  73.  
  74. #ifndef __cplusplus
  75. typedef struct point3D point3D;
  76.  
  77. typedef struct unit3D unit3D;
  78.  
  79. typedef struct camera camera;
  80.  
  81. typedef struct patch patch;
  82.  
  83. #endif
  84.  
  85. extern void InitCamera(camera *);
  86. extern void UpdateCamera(camera *);
  87. extern void PatchToCameraMap(patch *, camera *, gxMapping *);
  88. extern Fixed Unitize(point3D *, unit3D *);
  89. extern fract FracDot(unit3D *, unit3D *);
  90. extern void FracCross(unit3D *, unit3D *, unit3D *cross);
  91.     #ifdef __cplusplus
  92. }
  93.     #endif
  94.  
  95. #endif
  96.  
  97.